Optimal. Leaf size=71 \[ \frac {\sqrt {a+b x} (2 a B+A b)}{a}-\frac {(2 a B+A b) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {A (a+b x)^{3/2}}{a x} \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {78, 50, 63, 208} \begin {gather*} \frac {\sqrt {a+b x} (2 a B+A b)}{a}-\frac {(2 a B+A b) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {A (a+b x)^{3/2}}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 50
Rule 63
Rule 78
Rule 208
Rubi steps
\begin {align*} \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx &=-\frac {A (a+b x)^{3/2}}{a x}+\frac {\left (\frac {A b}{2}+a B\right ) \int \frac {\sqrt {a+b x}}{x} \, dx}{a}\\ &=\frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}+\frac {1}{2} (A b+2 a B) \int \frac {1}{x \sqrt {a+b x}} \, dx\\ &=\frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}+\frac {(A b+2 a B) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x}\right )}{b}\\ &=\frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}-\frac {(A b+2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 53, normalized size = 0.75 \begin {gather*} \frac {\sqrt {a+b x} (2 B x-A)}{x}-\frac {(2 a B+A b) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.09, size = 78, normalized size = 1.10 \begin {gather*} \frac {(-2 a B-A b) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {A b \sqrt {a+b x}-2 B (a+b x)^{3/2}+2 a B \sqrt {a+b x}}{b x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.04, size = 124, normalized size = 1.75 \begin {gather*} \left [\frac {{\left (2 \, B a + A b\right )} \sqrt {a} x \log \left (\frac {b x - 2 \, \sqrt {b x + a} \sqrt {a} + 2 \, a}{x}\right ) + 2 \, {\left (2 \, B a x - A a\right )} \sqrt {b x + a}}{2 \, a x}, \frac {{\left (2 \, B a + A b\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {b x + a} \sqrt {-a}}{a}\right ) + {\left (2 \, B a x - A a\right )} \sqrt {b x + a}}{a x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.18, size = 61, normalized size = 0.86 \begin {gather*} \frac {2 \, \sqrt {b x + a} B b - \frac {\sqrt {b x + a} A b}{x} + \frac {{\left (2 \, B a b + A b^{2}\right )} \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a}}}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 50, normalized size = 0.70 \begin {gather*} 2 \sqrt {b x +a}\, B -\frac {\left (A b +2 B a \right ) \arctanh \left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\sqrt {b x +a}\, A}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.99, size = 76, normalized size = 1.07 \begin {gather*} \frac {1}{2} \, b {\left (\frac {4 \, \sqrt {b x + a} B}{b} + \frac {{\left (2 \, B a + A b\right )} \log \left (\frac {\sqrt {b x + a} - \sqrt {a}}{\sqrt {b x + a} + \sqrt {a}}\right )}{\sqrt {a} b} - \frac {2 \, \sqrt {b x + a} A}{b x}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.41, size = 49, normalized size = 0.69 \begin {gather*} 2\,B\,\sqrt {a+b\,x}-\frac {\mathrm {atanh}\left (\frac {\sqrt {a+b\,x}}{\sqrt {a}}\right )\,\left (A\,b+2\,B\,a\right )}{\sqrt {a}}-\frac {A\,\sqrt {a+b\,x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 14.24, size = 155, normalized size = 2.18 \begin {gather*} - \frac {A a b \sqrt {\frac {1}{a^{3}}} \log {\left (- a^{2} \sqrt {\frac {1}{a^{3}}} + \sqrt {a + b x} \right )}}{2} + \frac {A a b \sqrt {\frac {1}{a^{3}}} \log {\left (a^{2} \sqrt {\frac {1}{a^{3}}} + \sqrt {a + b x} \right )}}{2} + \frac {2 A b \operatorname {atan}{\left (\frac {\sqrt {a + b x}}{\sqrt {- a}} \right )}}{\sqrt {- a}} - \frac {A \sqrt {a + b x}}{x} + \frac {2 B a \operatorname {atan}{\left (\frac {\sqrt {a + b x}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + 2 B \sqrt {a + b x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________